<?php
if(!defined('main')) {
die("Kein Zutritt"); }

$car_part_id = $row->userid;


include("include/game/scripts/car_parts.php");
include("include/game/wetter.php");
include("include/game/speed_antrieb.php");
include("include/game/speed_aero.php");
include("include/game/speed_elek.php");
include("include/game/speed_reifen.php");
#include("include/game/fahrer_fehler.php");


// Speed rechnen
$speed_teile_ges = $speed_ges_antrieb + $speed_ges_aero + $speed_ges_elek; // KM/H
$speed_tank_ges = tankspeed($row->tank);
$speed_reifen_ges = reifenspeed($reifen['speed'], $reifen['haltbarkeit'], $reifenzustand, $trackgrip, $reifen['grip']);

$kmh = $speed_teile_ges + $speed_tank_ges + $speed_reifen_ges;

$rundenzeit = $strecke_km / $kmh; // Rundenzeit 
$rundenzeitsek = $rundenzeit * 3600; // Rundenzeit in Sekunden
$rundenzeit = $rundenzeitsek * 1000; // Rundenzeit in Millisekunden



?>